﻿namespace KD.DAS.Component.Data
{
    /// <summary>
    /// 执行存储过程返回对象
    /// </summary>
    public class EntityExecProc
    {
        private int _iStatucode;
        private string _strStatudesc;
        private System.Data.DataSet _dsSource;
        Titan.DAS.Msg.Common.ProcParam[] _pProcParams;
        private bool _bSuccess = false;


        /// <summary>
        /// 构造函数
        /// </summary>
        public EntityExecProc() { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_iCode"></param>
        /// <param name="_strDesc"></param>
        /// <param name="_dsData"></param>
        /// <param name="_pPrams"></param>
        public EntityExecProc(bool _bSucc, int _iCode, string _strDesc, System.Data.DataSet _dsData, Titan.DAS.Msg.Common.ProcParam[] _pPrams)
        {
            RStatuCode = _iCode;
            RStatuDesc = _strDesc;
            RSource = _dsData;
            RParams = _pPrams;
            RSuccess = _bSucc;
        }

        /// <summary>
        /// 是否执行成功
        /// </summary>
        public bool RSuccess
        {
            set { _bSuccess = value; }
            get { return _bSuccess; }
        }

        /// <summary>
        /// 返回吗
        /// </summary>
        public int RStatuCode
        {
            set { _iStatucode = value; }
            get { return _iStatucode; }
        }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string RStatuDesc
        {
            set { _strStatudesc = value; }
            get { return _strStatudesc; }
        }

        /// <summary>
        /// 结果集
        /// </summary>
        public System.Data.DataSet RSource
        {
            set { _dsSource = value; }
            get { return _dsSource; }
        }

        /// <summary>
        /// 返回参数集合
        /// </summary>
        public Titan.DAS.Msg.Common.ProcParam[] RParams
        {
            set { _pProcParams = value; }
            get { return _pProcParams; }
        }
    }

    /// <summary>
    /// 执行SQL语句返回对象
    /// </summary>
    public class EntityExecSql
    {
        private int _iStatucode;
        private string _strStatudesc;
        private int _iAffectedRowNum;
        private bool _bSuccess = false;


        /// <summary>
        /// 构造函数
        /// </summary>
        public EntityExecSql() { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_iCode"></param>
        /// <param name="_strDesc"></param>
        /// <param name="_iRownum"></param>
        public EntityExecSql(bool _bSucc, int _iCode, string _strDesc, int _iRownum)
        {
            RStatuCode = _iCode;
            RStatuDesc = _strDesc;
            RAffectedRowNum = _iRownum;
            RSuccess = _bSucc;
        }

        /// <summary>
        /// 是否执行成功
        /// </summary>
        public bool RSuccess
        {
            set { _bSuccess = value; }
            get { return _bSuccess; }
        }

        /// <summary>
        /// 返回吗
        /// </summary>
        public int RStatuCode
        {
            set { _iStatucode = value; }
            get { return _iStatucode; }
        }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string RStatuDesc
        {
            set { _strStatudesc = value; }
            get { return _strStatudesc; }
        }

        /// <summary>
        /// 守影响行数
        /// </summary>
        public int RAffectedRowNum
        {
            set { _iAffectedRowNum = value; }
            get { return _iAffectedRowNum; }
        }
    }

    /// <summary>
    /// 查询SQL语句返回对象
    /// </summary>
    public class EntityQuerySql
    {
        private int _iStatucode;
        private string _strStatudesc;
        private System.Data.DataSet _dsSource;
        private bool _bSuccess = false;

        /// <summary>
        /// 构造函数
        /// </summary>
        public EntityQuerySql() { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_iCode"></param>
        /// <param name="_strDesc"></param>
        /// <param name="_dsData"></param>
        public EntityQuerySql(bool _bSucc, int _iCode, string _strDesc, System.Data.DataSet _dsData)
        {
            RStatuCode = _iCode;
            RStatuDesc = _strDesc;
            RSource = _dsData;
            RSuccess = _bSucc;
        }

        /// <summary>
        /// 是否执行成功
        /// </summary>
        public bool RSuccess
        {
            set { _bSuccess = value; }
            get { return _bSuccess; }
        }

        /// <summary>
        /// 返回吗
        /// </summary>
        public int RStatuCode
        {
            set { _iStatucode = value; }
            get { return _iStatucode; }
        }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string RStatuDesc
        {
            set { _strStatudesc = value; }
            get { return _strStatudesc; }
        }

        /// <summary>
        /// 结果集
        /// </summary>
        public System.Data.DataSet RSource
        {
            set { _dsSource = value; }
            get { return _dsSource; }
        }
    }
}
